<table style="width: 100%;" cellpadding="4" cellspacing="0">
    <tr>
        <td class="border2">
            <table style="width: 100%;cursor:pointer;padding:10px;" class="border4" cellpadding="0" cellspacing="0" border="0" onclick="SwitchMenu('sub2','hidetext2')">
                <tr>
                    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
                    <td style="font-weight:bold;text-align:left;" class="color2">{language text="random_polls"}</td>
                    <td style="text-align:right;padding-right:4px;"><span class="cur" id="hidetext2">[-]</span></td>
                </tr>
            </table>
            <div class="submenu" id="sub2">
                <table style="width:100%;height:270px;" cellspacing="0" cellpadding="0">
{if $aItem}
                    <tr>
                        <td style="font-size:7pt;vertical-align:top;">
                        <form method="post" action="{url link='public.poll.vote' id=$aItem.id}" style="margin:0px;">
                        <br />
                        <div style="font-size:9pt;font-weight:bold;" class="color">
                        <div style="text-align:center;">
                        <a href="{url link='public.user' name=$aItem.user}">
                        {Account::Avatar sUser=$aItem.user iSize=120 class="pic1" onmouseover="showInfo5('`$aItem.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
                        </a>
                        <br/>
                        {$aItem.poll|escape}
                        </div>
			{if $bVoted}                        
   				<div style="padding-left:10px;font-size:9pt;font-weight:normal;" class="color"><br />
    				{language text="you_have_already_voted_on_this_poll"} <br /><br /><b>{language text="your_answer"}:</b><br /> {$bVoted|escape}<br />
    			</div>			
			{else}                        
                        <div style="padding-left:10px;"><br/>
            {if $aItem.o1 != ''}<div><input type="radio" name="answer" class="pollinput" value="1" style="vertical-align:middle;" />{$aItem.o1|escape}</div>{/if}
            {if $aItem.o2 != ''}<div><input type="radio" name="answer" class="pollinput" value="2" style="vertical-align:middle;" />{$aItem.o2|escape}</div>{/if}
            {if $aItem.o3 != ''}<div><input type="radio" name="answer" class="pollinput" value="3" style="vertical-align:middle;" />{$aItem.o3|escape}</div>{/if}
            {if $aItem.o4 != ''}<div><input type="radio" name="answer" class="pollinput" value="4" style="vertical-align:middle;" />{$aItem.o4|escape}</div>{/if}
                        </div>          
                        <div style="padding:5px;text-align:center;">
                            <input type="submit" value=" {language text="vote"} " />
                        </div>
            {/if}
                        </div>
                        </form>
                    </td>
                    </tr>
            {if $bVoted}
                    <tr>
                        <td style="vertical-align:top;">
                            <div style="font-size:7pt;text-align:right;">
                                <a class="link_action" href="{url link='public.poll.view' id=$aItem.id}">[ {language text="view_polls_results"} ]</a>
                            </div>
                        </td>
                    </tr>
            {/if}
            {else}
                    <tr>
                        <td style="vertical-align:top;">
                        <br />
                            <div class="message_info">
                            {language text="there_are_no_polls_yet"}
                            </div>
                        </td>
                    </tr>
            {/if}
                    <tr>
                        <td style="vertical-align: bottom;">
                        <br />
                        <div style="font-size:7pt;text-align:right;">
                            <a class="link_action" href="{url link='public.account.submit.add-poll'}">[ {language text="add_your_poll"} ]</a>
                        </div>
                        </td>
                    </tr>
                </table>
            </div>
        </td>
    </tr>
</table>